import Sequelize from 'sequelize'
import db from '../util/db'


import Model from './base'

class _Model extends Model {
}


_Model.init({
    productId: {
        type: Sequelize.INTEGER,
    },
    options: {
        type: Sequelize.ARRAY(Sequelize.JSON), //0 1
        allowNull: false
    },
    stock: {
        type: Sequelize.INTEGER,
        allowNull: false
    },
    retailPrice: {
        type: Sequelize.FLOAT,
        allowNull: true
    },
    price: {
        type: Sequelize.FLOAT,
    },

}, {
    sequelize: db,
    freezeTableName: true,
    modelName: 'skus'
    // options
});

_Model.sync({force: false})
export default _Model
